﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
             xmlns:BioPatMLEditor_MBFParserControl="clr-namespace:BioPatMLEditor.MBFParserControl"
             xmlns:biopatmlEditor="clr-namespace:BioPatMLEditor"
             xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
             mc:Ignorable="d"
             x:Class="BioPatMLEditor.MBFParserControl.ParsedSequencesPanel">

    <UserControl.Resources>
        <DataTemplate x:Key="listBoxTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Name}"
                           Width="80" />
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot"
          Width="250"
          Height="150"
          MinWidth="200"
          MinHeight="150">
        <Border CornerRadius="5"
                Height="25"
                HorizontalAlignment="Stretch"
                Margin="5,5,10,5"
                VerticalAlignment="Top">
            <Border.Background>
                <SolidColorBrush Color="{StaticResource BorderColor1}" />
            </Border.Background>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="208*" />
                    <ColumnDefinition Width="25*" />
                </Grid.ColumnDefinitions>

                <TextBlock x:Name="titleBar"
                           Text="Sequence Parser"
                           TextWrapping="Wrap"
                           FontSize="13.333"
                           FontWeight="Bold"
                           FontStyle="Italic"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Left"
                           Margin="5,5,0,5"
                           Foreground="White" />

                <Button HorizontalAlignment="Center"
                        Name="CloseBtn"
                        VerticalAlignment="Center"
                        Grid.Column="1"
                        Width="15"
                        Height="15"
                        ToolTipService.ToolTip="Close panel"
                        Click="CloseBtn_Click" />
            </Grid>
        </Border>
        <Grid>
            <Border BorderThickness="3"
                    CornerRadius="5"
                    Canvas.Top="30"
                    Margin="5,40,10,10"
                    Padding="5"
                    AllowDrop="True"
                    Drop="DropFiles">

                <Border.BorderBrush>
                    <SolidColorBrush Color="{StaticResource BorderColor1}" />
                </Border.BorderBrush>

                <Grid>
                    <biopatmlEditor:SelectionList x:Name="filesList"
                                                  SelectionMode="Extended"
                                                  KeyDown="filesList_KeyDown" />

                    <Grid x:Name="fileLoadingPanel">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.213*" />
                            <RowDefinition Height="0.4*" />
                            <RowDefinition Height="0.4*" />
                        </Grid.RowDefinitions>

                        <TextBlock x:Name="fileParseStatus"
                                   Margin="0"
                                   TextWrapping="Wrap"
                                   d:LayoutOverrides="Height"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Center">
        			        <TextBlock.Foreground>
        				        <SolidColorBrush Color="{StaticResource TextForegroundColor1}" />
        			        </TextBlock.Foreground>
                        </TextBlock>

                        <Image Source="/BioPatMLEditor;component/ImgResources/folder.png"
                               Height="33"
                               Width="45"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Margin="0"
                               Grid.Row="1" />

                        <TextBlock x:Name="dragNDroptxt"
                                   TextAlignment="Center"
                                   HorizontalAlignment="Center"
                                   Margin="0"
                                   VerticalAlignment="Center"
                                   Grid.Row="2">
        			        <TextBlock.Foreground>
        				        <SolidColorBrush Color="{StaticResource TextForegroundColor1}" />
        			        </TextBlock.Foreground>

                        </TextBlock>

                        <Grid x:Name="fileCanvas"
                              Grid.RowSpan="3"
                              HorizontalAlignment="Stretch"
                              VerticalAlignment="Stretch"
                              Background="White"
                              Visibility="Collapsed">

                            <controlsToolkit:BusyIndicator x:Name="BusyPB"
                                                           IsBusy="True"
                                                           HorizontalAlignment="Center"
                                                           VerticalAlignment="Center" />
                        </Grid>
                    </Grid>

                </Grid>
            </Border>
        </Grid>

        <Thumb x:Name="resizeRight"
               HorizontalAlignment="Right"
               Width="5"
               Cursor="SizeWE"
               DragDelta="resizeRight_DragDelta"
               Template="{StaticResource VerticalThumbTemplate}"
               Margin="0"
               d:LayoutOverrides="GridBox" />

        <Thumb x:Name="resizeDown"
               Cursor="SizeNS"
               Height="5"
               VerticalAlignment="Bottom"
               Template="{StaticResource HorizontalThumbTemplate}"
               DragDelta="resizeDown_DragDelta"
               Margin="0"
               d:LayoutOverrides="Width, GridBox" />
    </Grid>
</UserControl>